#pragma once
#include<iostream>


class MyComplex {
private:
	double real;
	double imag;

public:
	MyComplex() { real = 0; imag = 0; }
	MyComplex(double r, double i) { real = r; imag = i; }
	MyComplex operator+(const MyComplex& z) const;
	MyComplex operator-(const MyComplex& z) const;
	MyComplex operator*(const MyComplex& z) const;
	friend MyComplex operator*(const double a,const MyComplex& z);
	friend MyComplex operator~(const MyComplex& z);
	friend std::ostream& operator<<(std::ostream& os, const MyComplex& z);
	friend bool operator>>(std::istream& is, MyComplex& z);
	~MyComplex();
};